/*
 * kdogs - Kick dogs, a lightweight watchdog kicker
 *
 * Copyright (C) 2007 Instituto Nokia de Tecnologia
 *
 * Author: Osvaldo Santana Neto <osvaldo.neto@openbossa.org>
 *         Abner Silva <abner.silva@openbossa.org>
 *
 *	This program is free software; you can redistribute it and/or modify it
 *	under the terms of the GNU General Public License as published by the
 *	Free Software Foundation version 2 of the License.
 *
 *	This program is distributed in the hope that it will be useful, but
 *	WITHOUT ANY WARRANTY; without even the implied warranty of
 *	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 *	General Public License for more details.
 *
 *	You should have received a copy of the GNU General Public License along
 *	with this program; if not, write to the Free Software Foundation, Inc.,
 *	51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 *
 */

#ifndef _KDOGS_H_
#define _KDOGS_H_

#define PATH_SIZE                   256
#define BUFFER_SIZE                 16

#define errmsg(format, arg...) { fprintf(stderr, format , ##arg); }

typedef struct _kdogs_wdt kdogs_wdt;

enum kdogs_wdt_ctrl_type
{
    WDT_CTRL_IOCTL = 0,
    WDT_CTRL_SYSFS
};

struct _kdogs_wdt
{
    int fd;
    int timeout;
    char path[PATH_SIZE];
    enum kdogs_wdt_ctrl_type type;
};

#define WDTS_SETTINGS_BEGIN kdogs_wdt wdts[] = {
#define WDTS_SETTINGS_END   {}};
#define WDTS_SIZE           (sizeof(wdts) / sizeof(kdogs_wdt) - 1)
#define WDT(i)              &wdts[i]

#endif /* _KDOGS_H_ */
